package org.dromara.creditcard.domain;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serial;
import java.util.HashMap;
import java.util.Map;

/**
 * 入账账单记录对象 credit_in_record
 *
 * @author Mr.Zhou
 * @date 2023-11-29
 */
@Data
@ExcelIgnoreUnannotated
@TableName("credit_in_record")
public class CreditInRecord implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    /**
     *  租户编号
     */
    private String tenantId;


    /**
     *  区域代理id
     */
    private Integer agentId;

    /**
     * 还款月份标识id
     */
    private Integer monthRecordId;

    /**
     * 账单编号
     */
    @ExcelProperty(value = "账单编号")
    private String recordNo;
    /**
     * 操作月份：  2023-11
     */
    @ExcelProperty(value = "操作月份")
    private String monthDate;

    /**
     * 卡片id
     */
    private Integer cardId;

    /**
     * 卡号
     */
    @ExcelProperty(value = "卡号")
    private String cardNum;

    /**
     * 记录类型 0 - 普通账号拆分记录 1 - 手动添加刷卡记录
     */
    private Integer recordType;


    @ExcelProperty(value = "记录类型")
    @TableField(exist = false)
    private String recordTypeTxt;

    /**
     * phone
     */
    @ExcelProperty(value = "持卡人手机号")
    private String phoneNum;

    /**
     * 持卡人姓名
     */
    @ExcelProperty(value = "持卡人姓名")
    private String holderName;

    /**
     * 持卡人id
     */
    private Integer holderId;

    /**
     * 操作人id
     */
    private Integer opSysUserId;

    /**
     * 本卡还款时间
     */
    @ExcelProperty(value = "本卡还款时间")
    private Date repayDay;
    /**
     * 预计入账时间
     */
    @ExcelProperty(value = "预计入账时间")
    private Date billRepayDay;

    /**
     * 预计入账金额
     */
    @ExcelProperty(value = "预计入账金额")
    private BigDecimal repayMoney;

    /**
     * 实际入账金额
     */
    @ExcelProperty(value = "实际入账金额")
    private BigDecimal payMoney;

    /**
     * 记录状态 0 - 待处理（未进账）  1 - 本次已进款   2 - 已超时未还款
     */
    private Integer state;

    /**
     * 排序索引
     */
    private Integer sort;


    /**
     * 是否有风险
     */
    private Integer isDanger;

    /**
     * 删除标识
     */
    private Integer isDel;

    /**
     * 入账时间
     */
    @ExcelProperty(value = "入账时间")
    private Date payTime;

    /**
     * 备注信息
     */
    @ExcelProperty(value = "备注信息")
    private String remark;
    /**
     * 添加时间
     */
    private Date createTime;

    /**
     * 请求参数
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    @TableField(exist = false)
    private Map<String, Object> params = new HashMap<>();


    /**
     *  进账数量
     */
    @TableField(exist = false)
    private Integer inCount;


}
